package com.chee.plant.hibernate.object.base;

import java.io.Serializable;

/**
 * This is an object that contains data related to the hero_skill_level table.
 * Do not modify this class because it will be overwritten if the configuration
 * file related to this class is modified.
 * 
 * @hibernate.class table="hero_skill_level"
 */

public abstract class BaseHeroSkillLevel implements Serializable {

	public static String REF = "HeroSkillLevel";
	public static String PROP_SKILL_TYPE = "SkillType";
	public static String PROP_RANGE = "SkillRange";
	public static String PROP_ADD_ATTACK = "AddAttack";
	public static String PROP_SKILL_ID = "SkillId";
	public static String PROP_ADD_DEFENSE = "AddDefense";
	public static String PROP_ADD_INTERVAL = "AddInterval";
	public static String PROP_ID = "Id";
	public static String PROP_ADD_LIFE = "AddLife";
	public static String PROP_NEED_LEVEL = "NeedLevel";

	// constructors
	public BaseHeroSkillLevel() {
		initialize();
	}

	/**
	 * Constructor for primary key
	 */
	public BaseHeroSkillLevel(java.lang.Integer id) {
		this.setId(id);
		initialize();
	}

	/**
	 * Constructor for required fields
	 */
	public BaseHeroSkillLevel(java.lang.Integer id, java.lang.Integer skillId,
			java.lang.Integer needLevel, java.lang.Integer addInterval,
			java.lang.Integer addAttack, java.lang.Integer addDefense,
			java.lang.Integer addLife, java.lang.Integer skillType,
			java.lang.Integer SkillRange) {

		this.setId(id);
		this.setSkillId(skillId);
		this.setNeedLevel(needLevel);
		this.setAddInterval(addInterval);
		this.setAddAttack(addAttack);
		this.setAddDefense(addDefense);
		this.setAddLife(addLife);
		this.setSkillType(skillType);
		this.setRange(SkillRange);
		initialize();
	}

	protected void initialize() {
	}

	private int hashCode = Integer.MIN_VALUE;

	// primary key
	private java.lang.Integer id;

	// fields
	private java.lang.Integer skillId;
	private java.lang.Integer needLevel;
	private java.lang.Integer addInterval;
	private java.lang.Integer addAttack;
	private java.lang.Integer addDefense;
	private java.lang.Integer addLife;
	private java.lang.Integer skillType;
	private java.lang.Integer skillRange;

	/**
	 * Return the unique identifier of this class
	 * 
	 * @hibernate.id generator-class="sequence" column="id"
	 */
	public java.lang.Integer getId() {
		return id;
	}

	/**
	 * Set the unique identifier of this class
	 * 
	 * @param id
	 *            the new ID
	 */
	public void setId(java.lang.Integer id) {
		this.id = id;
		this.hashCode = Integer.MIN_VALUE;
	}

	/**
	 * Return the value associated with the column: skill_id
	 */
	public java.lang.Integer getSkillId() {
		return skillId;
	}

	/**
	 * Set the value related to the column: skill_id
	 * 
	 * @param skillId
	 *            the skill_id value
	 */
	public void setSkillId(java.lang.Integer skillId) {
		this.skillId = skillId;
	}

	/**
	 * Return the value associated with the column: need_level
	 */
	public java.lang.Integer getNeedLevel() {
		return needLevel;
	}

	/**
	 * Set the value related to the column: need_level
	 * 
	 * @param needLevel
	 *            the need_level value
	 */
	public void setNeedLevel(java.lang.Integer needLevel) {
		this.needLevel = needLevel;
	}

	/**
	 * Return the value associated with the column: add_interval
	 */
	public java.lang.Integer getAddInterval() {
		return addInterval;
	}

	/**
	 * Set the value related to the column: add_interval
	 * 
	 * @param addInterval
	 *            the add_interval value
	 */
	public void setAddInterval(java.lang.Integer addInterval) {
		this.addInterval = addInterval;
	}

	/**
	 * Return the value associated with the column: add_attack
	 */
	public java.lang.Integer getAddAttack() {
		return addAttack;
	}

	/**
	 * Set the value related to the column: add_attack
	 * 
	 * @param addAttack
	 *            the add_attack value
	 */
	public void setAddAttack(java.lang.Integer addAttack) {
		this.addAttack = addAttack;
	}

	/**
	 * Return the value associated with the column: add_defense
	 */
	public java.lang.Integer getAddDefense() {
		return addDefense;
	}

	/**
	 * Set the value related to the column: add_defense
	 * 
	 * @param addDefense
	 *            the add_defense value
	 */
	public void setAddDefense(java.lang.Integer addDefense) {
		this.addDefense = addDefense;
	}

	/**
	 * Return the value associated with the column: add_life
	 */
	public java.lang.Integer getAddLife() {
		return addLife;
	}

	/**
	 * Set the value related to the column: add_life
	 * 
	 * @param addLife
	 *            the add_life value
	 */
	public void setAddLife(java.lang.Integer addLife) {
		this.addLife = addLife;
	}

	/**
	 * Return the value associated with the column: skill_type
	 */
	public java.lang.Integer getSkillType() {
		return skillType;
	}

	/**
	 * Set the value related to the column: skill_type
	 * 
	 * @param skillType
	 *            the skill_type value
	 */
	public void setSkillType(java.lang.Integer skillType) {
		this.skillType = skillType;
	}

	/**
	 * Return the value associated with the column: skillRange
	 */
	public java.lang.Integer getRange() {
		return skillRange;
	}

	/**
	 * Set the value related to the column: skillRange
	 * 
	 * @param range
	 *            the skillRange value
	 */
	public void setRange(java.lang.Integer skillRange) {
		this.skillRange = skillRange;
	}

	public boolean equals(Object obj) {
		if (null == obj)
			return false;
		if (!(obj instanceof com.chee.plant.hibernate.object.HeroSkillLevel))
			return false;
		else {
			com.chee.plant.hibernate.object.HeroSkillLevel heroSkillLevel = (com.chee.plant.hibernate.object.HeroSkillLevel) obj;
			if (null == this.getId() || null == heroSkillLevel.getId())
				return false;
			else
				return (this.getId().equals(heroSkillLevel.getId()));
		}
	}

	public int hashCode() {
		if (Integer.MIN_VALUE == this.hashCode) {
			if (null == this.getId())
				return super.hashCode();
			else {
				String hashStr = this.getClass().getName() + ":"
						+ this.getId().hashCode();
				this.hashCode = hashStr.hashCode();
			}
		}
		return this.hashCode;
	}

	public String toString() {
		return super.toString();
	}

	private static final long serialVersionUID = 1L;
}